﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Map.SimpleFlow
{
    using NHibernate;
    using NHibernate.Mapping.ByCode;
    using NHibernate.Mapping.ByCode.Conformist;

    using DB_NH.DB_Model.SimpleFlow;

    public class SpNode_Map : ClassMapping<SpNode>
    {
        public SpNode_Map()
        {
            Id(x => x.ID, map =>
            {
                map.Length(40);
                map.Column("node_id");
            });

            Property(x => x.CreateDate, map =>
            {
                map.Column("create_date");
            });

            Property(x => x.IsEnd, map =>
            {
                map.Column("is_end");
            });

            Property(x => x.IsValid, map =>
            {
                map.Column("is_valid");
            });

            Property(x => x.NodeCreatorId, map =>
            {
                map.Length(40);
                map.Column("node_req_userid");
            });

            Property(x => x.NodeName, map =>
            {
                map.Length(400);
                map.Column("node_name");
            });

            Property(x => x.NodeRecordId, map =>
            {
                map.Length(40);
                map.Column("node_rec_id");
            });

            Property(x => x.NodeTypeCode, map =>
            {
                map.Length(40);
                map.Column("node_type");
            });

            Property(x => x.NodeDescribe, map =>
            {
                map.Length(400000000);
                map.Column("node_describe");
            });

            Table("sp_node");
        }
    }
}
